/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.thienloc.omap.entity;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author GiangLT
 */
@Entity
@Table(name = "TBL_ALARM", catalog = "", schema = "SCRATCHCARD")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TblAlarm.findAll", query = "SELECT t FROM TblAlarm t"),
    @NamedQuery(name = "TblAlarm.findByAlarmCode", query = "SELECT t FROM TblAlarm t WHERE t.alarmCode = :alarmCode"),
    @NamedQuery(name = "TblAlarm.findByAlarmDesc", query = "SELECT t FROM TblAlarm t WHERE t.alarmDesc = :alarmDesc"),
    @NamedQuery(name = "TblAlarm.findByAlarmTime", query = "SELECT t FROM TblAlarm t WHERE t.alarmTime = :alarmTime"),
    @NamedQuery(name = "TblAlarm.findByAlarmTimeRange", query = "SELECT t FROM TblAlarm t WHERE t.alarmTime BETWEEN :startDate AND :endDate"),
    @NamedQuery(name = "TblAlarm.findByAlarmSentTime", query = "SELECT t FROM TblAlarm t WHERE t.alarmSentTime = :alarmSentTime"),
    @NamedQuery(name = "TblAlarm.findByGeneral1", query = "SELECT t FROM TblAlarm t WHERE t.general1 = :general1"),
    @NamedQuery(name = "TblAlarm.findByGeneral2", query = "SELECT t FROM TblAlarm t WHERE t.general2 = :general2"),
    @NamedQuery(name = "TblAlarm.findByGeneral3", query = "SELECT t FROM TblAlarm t WHERE t.general3 = :general3"),
    @NamedQuery(name = "TblAlarm.findByGeneral4", query = "SELECT t FROM TblAlarm t WHERE t.general4 = :general4"),
    @NamedQuery(name = "TblAlarm.findByGeneral5", query = "SELECT t FROM TblAlarm t WHERE t.general5 = :general5"),
    @NamedQuery(name = "TblAlarm.findByGeneral6", query = "SELECT t FROM TblAlarm t WHERE t.general6 = :general6"),
    @NamedQuery(name = "TblAlarm.findByGeneral7", query = "SELECT t FROM TblAlarm t WHERE t.general7 = :general7"),
    @NamedQuery(name = "TblAlarm.findByGeneral8", query = "SELECT t FROM TblAlarm t WHERE t.general8 = :general8"),
    @NamedQuery(name = "TblAlarm.findByGeneral9", query = "SELECT t FROM TblAlarm t WHERE t.general9 = :general9"),
    @NamedQuery(name = "TblAlarm.findByGeneral10", query = "SELECT t FROM TblAlarm t WHERE t.general10 = :general10")})
public class TblAlarm implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "ALARM_CODE")
    private BigInteger alarmCode;
    @Size(max = 255)
    @Column(name = "ALARM_DESC")
    private String alarmDesc;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ALARM_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    private Date alarmTime;
    @Column(name = "ALARM_SENT_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    private Date alarmSentTime;
    @Size(max = 20)
    @Column(name = "GENERAL1")
    private String general1;
    @Size(max = 30)
    @Column(name = "GENERAL2")
    private String general2;
    @Size(max = 40)
    @Column(name = "GENERAL3")
    private String general3;
    @Size(max = 50)
    @Column(name = "GENERAL4")
    private String general4;
    @Size(max = 60)
    @Column(name = "GENERAL5")
    private String general5;
    @Size(max = 100)
    @Column(name = "GENERAL6")
    private String general6;
    @Size(max = 200)
    @Column(name = "GENERAL7")
    private String general7;
    @Size(max = 300)
    @Column(name = "GENERAL8")
    private String general8;
    @Size(max = 400)
    @Column(name = "GENERAL9")
    private String general9;
    @Size(max = 500)
    @Column(name = "GENERAL10")
    private String general10;

    public TblAlarm() {
    }

    public TblAlarm(Date alarmTime) {
        this.alarmTime = alarmTime;
    }

    public BigInteger getAlarmCode() {
        return alarmCode;
    }

    public void setAlarmCode(BigInteger alarmCode) {
        this.alarmCode = alarmCode;
    }

    public String getAlarmDesc() {
        return alarmDesc;
    }

    public void setAlarmDesc(String alarmDesc) {
        this.alarmDesc = alarmDesc;
    }

    public Date getAlarmTime() {
        return alarmTime;
    }

    public void setAlarmTime(Date alarmTime) {
        this.alarmTime = alarmTime;
    }

    public Date getAlarmSentTime() {
        return alarmSentTime;
    }

    public void setAlarmSentTime(Date alarmSentTime) {
        this.alarmSentTime = alarmSentTime;
    }

    public String getGeneral1() {
        return general1;
    }

    public void setGeneral1(String general1) {
        this.general1 = general1;
    }

    public String getGeneral2() {
        return general2;
    }

    public void setGeneral2(String general2) {
        this.general2 = general2;
    }

    public String getGeneral3() {
        return general3;
    }

    public void setGeneral3(String general3) {
        this.general3 = general3;
    }

    public String getGeneral4() {
        return general4;
    }

    public void setGeneral4(String general4) {
        this.general4 = general4;
    }

    public String getGeneral5() {
        return general5;
    }

    public void setGeneral5(String general5) {
        this.general5 = general5;
    }

    public String getGeneral6() {
        return general6;
    }

    public void setGeneral6(String general6) {
        this.general6 = general6;
    }

    public String getGeneral7() {
        return general7;
    }

    public void setGeneral7(String general7) {
        this.general7 = general7;
    }

    public String getGeneral8() {
        return general8;
    }

    public void setGeneral8(String general8) {
        this.general8 = general8;
    }

    public String getGeneral9() {
        return general9;
    }

    public void setGeneral9(String general9) {
        this.general9 = general9;
    }

    public String getGeneral10() {
        return general10;
    }

    public void setGeneral10(String general10) {
        this.general10 = general10;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (alarmTime != null ? alarmTime.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TblAlarm)) {
            return false;
        }
        TblAlarm other = (TblAlarm) object;
        if ((this.alarmTime == null && other.alarmTime != null) || (this.alarmTime != null && !this.alarmTime.equals(other.alarmTime))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.thienloc.omap.entity.TblAlarm[ alarmTime=" + alarmTime + " ]";
    }
    
}
